Implementing Constraint Handling Rules as a Domain-Specific Language Embedded in Java
نویسنده
چکیده
Programming languages and techniques based on logic and constraints, such as the Constraint Handling Rules (CHR), can support many common programming tasks that can be expressed in the form of a search for feasible or optimal solutions. Developing new constraint solvers using CHR is especially interesting in configuration management for large scale, distributed and dynamic cloud applications, where dynamic configuration and component selection is an integral part of the programming environment. Writing CHR-style constraint solvers in a domain-specific language which is a subset of Java – instead of using a separate language layer – solves many integration, development cycle disruption, testing and debugging problems that discourage or make difficult the adoption of the CHR-based approach in the mainstream programming environments. Besides, the prototype implementation exposes a well-defined API that supports transactional store behavior, safe termination, and debugging via event notifications.
منابع مشابه
Context-Dependent Type Error Diagnosis for Functional Languages
Customizable type error diagnosis has been proposed as a solution to achieve domain-specific type error diagnosis for embedded domain specific languages. A proven approach is to phrase type inferencing as a constraint-solving problem, so that we can manipulate the order in which constraints are solved, and associate domain-specific type error messages with specific constraints to be communicate...
متن کاملA Type System for CHR
We propose a generic type system for the Constraint Handling Rules (CHR), a rewriting rule language for implementing constraint solvers. CHR being a high-level extension of a host language, such as Prolog or Java, this type system is parameterized by the type system of the host language. We show the consistency of the type system for CHR w.r.t. its operational semantics. We also study the case ...
متن کاملAdaptive CHR Meets CHRv: An Extended Refined Operational Semantics for CHRv Based on Justifications
Adaptive constraint processing with Constraint Handling Rules (CHR) allows the application of intelligent search strategies to solve Constraint Satisfaction Problems (CSP), but these search algorithms have to be implemented in the host language of adaptive CHR, which is currently Java. On the other hand, CHR enables to explicitly formulate search in CHR, using disjunctive bodies to model choice...
متن کاملK.U.Leuven JCHR: a User-Friendly, Flexible and Efficient CHR System for Java
A new integration of Constraint Handling Rules (CHR) and Java is presented: the K.U.Leuven JCHR system. It was designed with three aims in mind: user-friendliness, flexibility and efficiency. User-friendliness is achieved by providing a high-level syntax that feels familiar to both Java programmers and users of other CHR embeddings, and by full compliance to the refined operational semantics. F...
متن کاملTo the Gates of HAL: A HAL Tutorial
Experience using constraint programming to solve real-life problems has shown that finding an efficient solution to the problem often requires experimentation with different constraint solvers or even building a problem-specific constraint solver. HAL is a new constraint logic programming language expressly designed to facilitate this process. It provides semi-optional type, mode and determinis...
متن کاملذخیره در منابع من
با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید
عنوان ژورنال:
- CoRR
دوره abs/1308.3939 شماره
صفحات -
تاریخ انتشار 2013